<template>
  <div class="search">
    <form action="/">
    <van-search
        v-model="value"
        show-action
        placeholder="请输入搜索关键词"
        @search="onSearch"
        @click="gosearch($event)"
        background="rgb(241, 241, 242)"
        shape="round"
    >
      <template #action>
        <slot name="action"></slot>
      </template>
    </van-search>
    </form>
</div>
</template>

<script>
export default {
  data () {
    return {
      value: ''
    }
  },
  methods: {
    onSearch (val) {
    },
    gosearch (e) {
      this.$router.push('/search')
    }

  }

}
</script>

<style>

</style>
